package com.ror.java.se.file;

import java.io.File;

public class Demo01 {
    public static void main(String[] args) {
        String parent = "assets" + File.separator + "file";
        File parentObj = new File(parent);
        String child = "test.txt";
        File test1 = new File(parent, child); //可传入两个字符串
        File test2 = new File(parentObj, child); //可传入File对象+字符串
        //File对象+File对象不行
//        File test3 = new File(parent, new File(child));
        System.out.println(test1); //mac: assets/file/test.txt
        System.out.println(test2);
    }
}
